﻿import QtQuick 2.4
import QtQuick.Window 2.0
Rectangle
{


    //传递的值
    property string passName:""
    property bool   isPassName:false
    property string cityRan: ""
    //获取全屏参数
    property int rightM:Screen.width
    property int topM:Screen.height

    signal openAppRanking()
    signal openAPPDetaShow()
    signal colseSiteRanking()

    signal openSliverTime()

    signal closeWidOnRanking()
    signal closeSatelLitePanel()
    id:root
    color:"transparent"
    width:rightM*0.9
    height:topM*0.9

    Image
      {
           id:systemName
           source:"./切图/头/系统名.png"
           anchors.left:parent.left
           anchors.leftMargin:10
           anchors.top:parent.top
           anchors.topMargin:10
           z:1
      }
      Rectangle
      {
            id:bg
            width:parent.width
            height:parent.height
            color:"transparent"
            z:0
            visible:false
      }

      APPTitle
      {
            id:title
           // width:parent.width*0.124
            anchors.top:parent.top
            anchors.right:parent.right
            rightM:root.width
            topM:root.height
            z:4

       }
        APPMenu
        {
            id:menu
           // width:parent.width*0.45
            anchors.top:parent.top
            anchors.topMargin:height
            anchors.right: parent.right
            z:3
        }
        APPIndex
        {
            id:index
            //width:parent.width*0.04
            anchors.right:parent.right
            anchors.verticalCenter: parent.verticalCenter
            z:2
        }

        APPTimeBar
        {
            id:timebar
            width:parent.width
            anchors.bottom:parent.bottom
            anchors.left: parent.left
            anchors.right: tail.left
            z:2
        }

         APPTail
         {
             id:tail
//             width:parent.width
             anchors.right: parent.right
             anchors.bottom: parent.bottom
             anchors.bottomMargin: 38
             z:2
         }
         APPRanking
         {
             id:raning
             anchors.left: parent.left
             anchors.leftMargin: 16
//             anchors.top: parent.top
//             anchors.topMargin: 76
             anchors.verticalCenter:parent.verticalCenter
//             anchors.verticalCenterOffset:  -100
//             visible: true
             z:2
         }

         APPDetaShow
         {
             id:detaSh
             anchors.left: parent.left
             anchors.leftMargin: 16
             anchors.verticalCenter: parent.verticalCenter
//             anchors.top: parent.top
//             anchors.topMargin: 100
             z:2
             visible: false
         }

         APPStatus
         {
             id:status
             anchors.left: parent.left
//             anchors.leftMargin: 120
             anchors.leftMargin: 160
             anchors.bottom: parent.bottom
             anchors.bottomMargin: timebar.height
             z:2
         }
         APPPopu{
             id:popu
             x:popu.px
             y:popu.py
         }
         APPEnterpriseInformation
         {
             id:enterpriseInformation
//             anchors.centerIn: parent
             x:enterpriseInformation.px
             y:enterpriseInformation.py
         }

         Loader {
             id: pageLoader
             anchors.right: index.left
             anchors.rightMargin: 100
             anchors.verticalCenter: parent.verticalCenter
//             visible: false
             focus: false
             onLoaded:
             {
                 var i = th3dView.saveSatelitePanel();
                  item.xingXi(i)
             }
         }
         APPTimePanel
         {
             id:timePanel
             anchors.top: title.bottom
             anchors.topMargin: 24
             anchors.left: parent.left
             anchors.leftMargin: 44
//             anchors.rightMargin: 100
//             anchors.verticalCenter: parent.verticalCenter
//             visible: false
         }
//         APPSatellitePanel
//         {
//             id:noaa
//             anchors.right: index.left
//             anchors.rightMargin: 100
//             anchors.verticalCenter: parent.verticalCenter
//             visible: false
//         }
         Connections
         {
             onOpenAppRanking:
             {
                 detaSh.visible = false
                 raning.visible = true
             }
             onOpenAPPDetaShow:
             {
                 raning.visible = false
                 detaSh.visible = true
             }
             onColseSiteRanking:
             {
                 menu.replaceSite();
             }
//             //临时暂用
             onOpenSliverTime:
             {
               menu.llutionDisperItemSubmenu()
             }
             onCloseWidOnRanking:
             {
                  menu.replaceSite();
                 raning.visible = false
             }
             onCloseSatelLitePanel:
             {
                 pageLoader.source = ""
             }
         }
         Connections
         {
             target: th3dView
             onCloseChildMenu:
             {
                 menu.detectionStatus();
                 tail.colseDetection();
             }
             onOpenSatelitePanel:
             {
                 pageLoader.source = "APPSatellitePanel.qml"
             }
             onCloseSatelitePanel:
             {
                  pageLoader.source = ""
             }
             onPaseCartoon:
             {
                 if(pageLoader.progress ===1)
                 {
                      pageLoader.item.parsex();
                 }
             }
             onStartCartoon:
             {
                 if(pageLoader.progress ===1)
                 {
                     pageLoader.item.open();
                 }
             }
         }

}

